<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>接口列表</title>
<link rel="stylesheet" type="text/css" href="./css/mserver.css" />
<link rel="stylesheet" type="text/css" href="./css/calender.css" />
<link rel="stylesheet" type="text/css" href="./css/mserverother.css" />
<link rel="stylesheet" type="text/css" href="./css/tip-yellow.css" />
<link rel="stylesheet" type="text/css" href="./css/tip-darkgray.css" />
<link rel="stylesheet" type="text/css" href="./css/tableStyle.css" />
<script src="./js/jquery-1.8.0.min.js"></script>
<script src="./js/Common.js"></script>
</head>

<body>
	<div class="right">
		<div class="api_list">
			<h1>接口列表</h1>
			<ul>
			</ul>
		</div>
		<ul class="detail_list">
		</ul>
		<p>
			<br />
			<br />
		</p>
	</div>

	<script type="text/javascript">
		function ApiClass_Callback(ret) {
			if (ret) {
				var api_list = '';
				var detail_list = '';
				for (var i = 0; i < ret.length; i++) {
					api_list += '<li><a href="#' + ret[i].id + '">' + ret[i].apiClassName + '</a></li>';
					detail_list += '<li><div class="title"><h2><a name="' + ret[i].id + '">' + ret[i].apiClassName + '</a></h2><a class="show" style="cursor: pointer;">[隐藏]</a></div><div class="theme_content" style="text-indent: 24px;"><p>' + ret[i].description + '<a href="javascript:window.parent.Public.Redirect(\'API.jsp?apiClassId=' + ret[i].id + '\',\'_blank\');">&lt;查看详情&gt;</a></p></div></li>';
				}

				if ($.trim(api_list).length > 0) {
					$('.api_list ul').append(api_list);
				}

				if ($.trim(detail_list).length > 0) {
					$('.detail_list').append(detail_list);
					$('.detail_list li').css('padding-bottom', '20px');
				}
			}

			$(".show").click(function() {
				Public.Fold(this);
			});

			window.parent.Public.ReSizeFrame();
		}

		$(function() {
			window.parent.Public.CurrentPage(this);
			Public.ajaxPost(window.parent.path + apis["getApiClass"], null, ApiClass_Callback, null);
		});
	</script>
</body>
</html>